package com.project.platform.mapper;

import com.project.platform.entity.Admin;
import com.project.platform.entity.Family;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


public interface FamilyMapper {
    List<Family> queryPage(Integer offset, Integer pageSize, @Param("query") Map<String, Object> query);

    int queryCount(@Param("query") Map<String, Object> query);

    @Select("SELECT * FROM family WHERE id = #{id}")
    Family selectById(Integer id);

    @Select("SELECT * FROM family")
    List<Family> list();

    int insert(Family entity);

    int updateById(Family entity);

    boolean removeByIds(List<Integer> ids);

    @Select("SELECT * FROM family WHERE username = #{username}")
    Family selectByUserName(String username);

    @Select("SELECT * FROM family WHERE tel = #{tel}")
    Family selectByTel(String tel);
}